package com.childenglish.entity;

import java.util.Date;

public class FileInfo {
    private Long id;
    private String fileMd5;
    private String fileName;
    private String originalName;
    private String filePath;
    private Long fileSize;
    private String fileType;
    private String mimeType;
    private Integer chunked; // 0:非分片, 1:分片上传
    private Integer totalChunks;
    private Long chunkSize;
    private Date uploadTime;
    private Date completeTime;
    private Integer status; // 0:上传中, 1:上传完成, 2:合并完成, 3:上传失败
    private String uploadUser;
    private String description;
    private Integer reviewStatus; // 审核状态: 0=待审核, 1=已通过, 2=已拒绝
    private String reviewReason; // 审核原因（拒绝时填写）
    private String reviewer; // 审核人
    private Date reviewTime; // 审核时间

    // 构造函数
    public FileInfo() {}

    public FileInfo(String fileMd5, String fileName, String originalName,
                    Long fileSize, String fileType, String mimeType) {
        this.fileMd5 = fileMd5;
        this.fileName = fileName;
        this.originalName = originalName;
        this.fileSize = fileSize;
        this.fileType = fileType;
        this.mimeType = mimeType;
        this.uploadTime = new Date();
        this.status = 0;
        this.chunked = 0;
    }

    // Getter和Setter方法
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getFileMd5() { return fileMd5; }
    public void setFileMd5(String fileMd5) { this.fileMd5 = fileMd5; }

    public String getFileName() { return fileName; }
    public void setFileName(String fileName) { this.fileName = fileName; }

    public String getOriginalName() { return originalName; }
    public void setOriginalName(String originalName) { this.originalName = originalName; }

    public String getFilePath() { return filePath; }
    public void setFilePath(String filePath) { this.filePath = filePath; }

    public Long getFileSize() { return fileSize; }
    public void setFileSize(Long fileSize) { this.fileSize = fileSize; }

    public String getFileType() { return fileType; }
    public void setFileType(String fileType) { this.fileType = fileType; }

    public String getMimeType() { return mimeType; }
    public void setMimeType(String mimeType) { this.mimeType = mimeType; }

    public Integer getChunked() { return chunked; }
    public void setChunked(Integer chunked) { this.chunked = chunked; }

    public Integer getTotalChunks() { return totalChunks; }
    public void setTotalChunks(Integer totalChunks) { this.totalChunks = totalChunks; }

    public Long getChunkSize() { return chunkSize; }
    public void setChunkSize(Long chunkSize) { this.chunkSize = chunkSize; }

    public Date getUploadTime() { return uploadTime; }
    public void setUploadTime(Date uploadTime) { this.uploadTime = uploadTime; }

    public Date getCompleteTime() { return completeTime; }
    public void setCompleteTime(Date completeTime) { this.completeTime = completeTime; }

    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }

    public String getUploadUser() { return uploadUser; }
    public void setUploadUser(String uploadUser) { this.uploadUser = uploadUser; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public Integer getReviewStatus() { return reviewStatus; }
    public void setReviewStatus(Integer reviewStatus) { this.reviewStatus = reviewStatus; }

    public String getReviewReason() { return reviewReason; }
    public void setReviewReason(String reviewReason) { this.reviewReason = reviewReason; }

    public String getReviewer() { return reviewer; }
    public void setReviewer(String reviewer) { this.reviewer = reviewer; }

    public Date getReviewTime() { return reviewTime; }
    public void setReviewTime(Date reviewTime) { this.reviewTime = reviewTime; }

    @Override
    public String toString() {
        return "FileInfo{" +
                "id=" + id +
                ", fileMd5='" + fileMd5 + '\'' +
                ", fileName='" + fileName + '\'' +
                ", originalName='" + originalName + '\'' +
                ", fileSize=" + fileSize +
                ", fileType='" + fileType + '\'' +
                ", mimeType='" + mimeType + '\'' +
                ", chunked=" + chunked +
                ", uploadTime=" + uploadTime +
                ", status=" + status +
                '}';
    }
}